*******************************
Compiling mdPhonePHPWrapper.cpp
*******************************

You may need to recompile mdPhonePHPWrapper.cpp if you are not using a version of PHP that is compatible with
the php_mdPhonePHPWrapper.dll that is supplied. 

Prerequisites:
	
	Visual C++ Compiler
	PHP Binary installed (tested with PHP 5.2.6)
	PHP Source Code (tested with PHP 5.2.6)


To compile mdPhonePHPWrapper.cpp, a bat file has been supplied. This bat file requires the Visual Studio C++ 
compiler. To use the compiler, you must set up its environment by executing vcvars32.bat in the Visual Studio
C++ bin folder. Read the comments at the top of CreateDll.bat for more details.

You must then set the path to the PHP Include and Library path. You also need to set the path of the Phone Object
library (mdPhone.dll). The default locations of these files have been set already but may require changes if your
system is different.

**********
64 Bit mode
**********
To use this wrapper in 64bit mode, you must use the 64 bit version of Phone Object and recompile the wrapper dlls 
on a 64bit machine. To do so, go into the "Source" directory and follow the instructions in CreateDLL.bat. You 
must use the Visual Studio x64 Command Prompt instead of the 32bit (default) one. 
* 64bit version available in C:\Program Files\Melissa DATA\DQT\PhoneObj\dll_64bit



set mdPhonePath to location of mdPhone.dll
set PHPIncludePath1 to location of PHP Source Zend Directory
set PHPIncludePath2 to location of PHP Source Win32Directory
set PHPIncludePath3 to location of PHP Source TSRMDirectory
set PHPIncludePath4 to location of PHP Source Main Directory
set PHPIncludePath5 to location of PHP Source Directory
set PHPLibraryPath to location of PHP Binary Dev Directory (contains php5ts.lib)

You will also need to change the PHP dependency that the code needs based on your version of PHP. In CreateDll.bat, 
you will need to change the following to match your installation of PHP:

	-DEFAULTLIB:php5ts.lib

phpXts.lib should be in your PHP\dev directory. For example, if you are using PHP 4 , you will change to:

	-DEFAULTLIB:php4ts.lib


Now, you can run CreateDll.bat to create php_mdPhonePHPWrapper.dll.




*****
Note: 
*****

If when running CreateDll.bat, you get a series or errors containing "cannot allocate an array of constant size 0," 
you are likely trying to compile with Visual C++ 8 (Visual Studio 2005). There appears to be a bug in the PHP source 
code relating to Visual Studio 2005 that is not present in Visual Studio 2003. Please try compiling with Visual C++ 7 
or earlier. Or, you can go into php/main/config.w32.h and comment out these two lines:

#define _USE_32BIT_TIME_T 1
#define HAVE_STDLIB_H 1
